

<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
  <meta charset="utf-8" />
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  
  <title>mindspore.dataset &mdash; MindSpore master documentation</title>
  

  
  <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
  <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />

  
  

  
  

  

  
  <!--[if lt IE 9]>
    <script src="../_static/js/html5shiv.min.js"></script>
  <![endif]-->
  
    
      <script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
        <script src="../_static/jquery.js"></script>
        <script src="../_static/underscore.js"></script>
        <script src="../_static/doctools.js"></script>
        <script src="../_static/language_data.js"></script>
        <script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
    
    <script type="text/javascript" src="../_static/js/theme.js"></script>

    
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="mindspore.dataset.Caltech101Dataset" href="dataset/mindspore.dataset.Caltech101Dataset.html" />
    <link rel="prev" title="mindspore.context" href="mindspore.context.html" /> 
</head>

<body class="wy-body-for-nav">

   
  <div class="wy-grid-for-nav">
    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search" >
          

          
            <a href="../index.html" class="icon icon-home"> MindSpore
          

          
          </a>

          
            
            
          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        
        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
              
            
            
              <p class="caption"><span class="caption-text">MindSpore Python API</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="mindspore.html">mindspore</a></li>
<li class="toctree-l1"><a class="reference internal" href="mindspore.common.initializer.html">mindspore.common.initializer</a></li>
<li class="toctree-l1"><a class="reference internal" href="mindspore.communication.html">mindspore.communication</a></li>
<li class="toctree-l1"><a class="reference internal" href="mindspore.compression.html">mindspore.compression</a></li>
<li class="toctree-l1"><a class="reference internal" href="mindspore.context.html">mindspore.context</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">mindspore.dataset</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#id1">视觉</a><ul>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.Caltech101Dataset.html">mindspore.dataset.Caltech101Dataset</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.Caltech256Dataset.html">mindspore.dataset.Caltech256Dataset</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.CelebADataset.html">mindspore.dataset.CelebADataset</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.Cifar10Dataset.html">mindspore.dataset.Cifar10Dataset</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.Cifar100Dataset.html">mindspore.dataset.Cifar100Dataset</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.CityscapesDataset.html">mindspore.dataset.CityscapesDataset</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.CocoDataset.html">mindspore.dataset.CocoDataset</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.DIV2KDataset.html">mindspore.dataset.DIV2KDataset</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.EMnistDataset.html">mindspore.dataset.EMnistDataset</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.FakeImageDataset.html">mindspore.dataset.FakeImageDataset</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.FashionMnistDataset.html">mindspore.dataset.FashionMnistDataset</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.FlickrDataset.html">mindspore.dataset.FlickrDataset</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.Flowers102Dataset.html">mindspore.dataset.Flowers102Dataset</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.ImageFolderDataset.html">mindspore.dataset.ImageFolderDataset</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.KMnistDataset.html">mindspore.dataset.KMnistDataset</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.ManifestDataset.html">mindspore.dataset.ManifestDataset</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.MnistDataset.html">mindspore.dataset.MnistDataset</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.PhotoTourDataset.html">mindspore.dataset.PhotoTourDataset</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.Places365Dataset.html">mindspore.dataset.Places365Dataset</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.QMnistDataset.html">mindspore.dataset.QMnistDataset</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.SBDataset.html">mindspore.dataset.SBDataset</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.SBUDataset.html">mindspore.dataset.SBUDataset</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.SemeionDataset.html">mindspore.dataset.SemeionDataset</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.STL10Dataset.html">mindspore.dataset.STL10Dataset</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.SVHNDataset.html">mindspore.dataset.SVHNDataset</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.USPSDataset.html">mindspore.dataset.USPSDataset</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.VOCDataset.html">mindspore.dataset.VOCDataset</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.WIDERFaceDataset.html">mindspore.dataset.WIDERFaceDataset</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#id2">文本</a><ul>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.AGNewsDataset.html">mindspore.dataset.AGNewsDataset</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.AmazonReviewDataset.html">mindspore.dataset.AmazonReviewDataset</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.CLUEDataset.html">mindspore.dataset.CLUEDataset</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.CoNLL2000Dataset.html">mindspore.dataset.CoNLL2000Dataset</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.CSVDataset.html">mindspore.dataset.CSVDataset</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.DBpediaDataset.html">mindspore.dataset.DBpediaDataset</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.EnWik9Dataset.html">mindspore.dataset.EnWik9Dataset</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.IMDBDataset.html">mindspore.dataset.IMDBDataset</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.IWSLT2016Dataset.html">mindspore.dataset.IWSLT2016Dataset</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.IWSLT2017Dataset.html">mindspore.dataset.IWSLT2017Dataset</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.PennTreebankDataset.html">mindspore.dataset.PennTreebankDataset</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.SogouNewsDataset.html">mindspore.dataset.SogouNewsDataset</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.TextFileDataset.html">mindspore.dataset.TextFileDataset</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.UDPOSDataset.html">mindspore.dataset.UDPOSDataset</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.WikiTextDataset.html">mindspore.dataset.WikiTextDataset</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.YahooAnswersDataset.html">mindspore.dataset.YahooAnswersDataset</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.YelpReviewDataset.html">mindspore.dataset.YelpReviewDataset</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#id3">音频</a><ul>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.LJSpeechDataset.html">mindspore.dataset.LJSpeechDataset</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.SpeechCommandsDataset.html">mindspore.dataset.SpeechCommandsDataset</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.TedliumDataset.html">mindspore.dataset.TedliumDataset</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.YesNoDataset.html">mindspore.dataset.YesNoDataset</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#id4">标准格式</a><ul>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.CSVDataset.html">mindspore.dataset.CSVDataset</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.MindDataset.html">mindspore.dataset.MindDataset</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.TFRecordDataset.html">mindspore.dataset.TFRecordDataset</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#id5">用户自定义</a><ul>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.GeneratorDataset.html">mindspore.dataset.GeneratorDataset</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.NumpySlicesDataset.html">mindspore.dataset.NumpySlicesDataset</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.PaddedDataset.html">mindspore.dataset.PaddedDataset</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.RandomDataset.html">mindspore.dataset.RandomDataset</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#id6">图</a><ul>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.GraphData.html">mindspore.dataset.GraphData</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#id7">采样器</a><ul>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.DistributedSampler.html">mindspore.dataset.DistributedSampler</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.PKSampler.html">mindspore.dataset.PKSampler</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.RandomSampler.html">mindspore.dataset.RandomSampler</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.SequentialSampler.html">mindspore.dataset.SequentialSampler</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.SubsetRandomSampler.html">mindspore.dataset.SubsetRandomSampler</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.SubsetSampler.html">mindspore.dataset.SubsetSampler</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.WeightedRandomSampler.html">mindspore.dataset.WeightedRandomSampler</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#id8">其他</a><ul>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.BatchInfo.html">mindspore.dataset.BatchInfo</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.DatasetCache.html">mindspore.dataset.DatasetCache</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.DSCallback.html">mindspore.dataset.DSCallback</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.SamplingStrategy.html">mindspore.dataset.SamplingStrategy</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.Schema.html">mindspore.dataset.Schema</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.Shuffle.html">mindspore.dataset.Shuffle</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.WaitedDSCallback.html">mindspore.dataset.WaitedDSCallback</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.OutputFormat.html">mindspore.dataset.OutputFormat</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.compare.html">mindspore.dataset.compare</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.deserialize.html">mindspore.dataset.deserialize</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.serialize.html">mindspore.dataset.serialize</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.show.html">mindspore.dataset.show</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.utils.imshow_det_bbox.html">mindspore.dataset.utils.imshow_det_bbox</a></li>
<li class="toctree-l3"><a class="reference internal" href="dataset/mindspore.dataset.zip.html">mindspore.dataset.zip</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="mindspore.dataset.audio.html">mindspore.dataset.audio</a></li>
<li class="toctree-l1"><a class="reference internal" href="mindspore.dataset.config.html">mindspore.dataset.config</a></li>
<li class="toctree-l1"><a class="reference internal" href="mindspore.dataset.text.html">mindspore.dataset.text</a></li>
<li class="toctree-l1"><a class="reference internal" href="mindspore.dataset.transforms.html">mindspore.dataset.transforms</a></li>
<li class="toctree-l1"><a class="reference internal" href="mindspore.dataset.vision.html">mindspore.dataset.vision</a></li>
<li class="toctree-l1"><a class="reference internal" href="mindspore.mindrecord.html">mindspore.mindrecord</a></li>
<li class="toctree-l1"><a class="reference internal" href="mindspore.nn.html">mindspore.nn</a></li>
<li class="toctree-l1"><a class="reference internal" href="mindspore.nn.probability.html">mindspore.nn.probability</a></li>
<li class="toctree-l1"><a class="reference internal" href="mindspore.nn.transformer.html">mindspore.nn.transformer</a></li>
<li class="toctree-l1"><a class="reference internal" href="mindspore.numpy.html">mindspore.numpy</a></li>
<li class="toctree-l1"><a class="reference internal" href="mindspore.ops.html">mindspore.ops</a></li>
<li class="toctree-l1"><a class="reference internal" href="mindspore.parallel.html">mindspore.parallel</a></li>
<li class="toctree-l1"><a class="reference internal" href="mindspore.parallel.nn.html">mindspore.parallel.nn</a></li>
<li class="toctree-l1"><a class="reference internal" href="mindspore.profiler.html">mindspore.profiler</a></li>
<li class="toctree-l1"><a class="reference internal" href="mindspore.scipy.html">mindspore.scipy</a></li>
<li class="toctree-l1"><a class="reference internal" href="mindspore.train.html">mindspore.train</a></li>
<li class="toctree-l1"><a class="reference internal" href="mindspore.boost.html">mindspore.boost</a></li>
</ul>
<p class="caption"><span class="caption-text">MindSpore C++ API</span></p>
<ul>
<li class="toctree-l1"><a class="reference external" href="https://www.mindspore.cn/lite/api/zh-CN/master/api_cpp/mindspore.html">MindSpore Lite↗</a></li>
</ul>

            
          
        </div>
        
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="../index.html">MindSpore</a>
        
      </nav>


      <div class="wy-nav-content">
        
        <div class="rst-content">
        
          

















<div role="navigation" aria-label="breadcrumbs navigation">

  <ul class="wy-breadcrumbs">
    
      <li><a href="../index.html" class="icon icon-home"></a> &raquo;</li>
        
      <li>mindspore.dataset</li>
    
    
      <li class="wy-breadcrumbs-aside">
        
          
            <a href="../_sources/api_python/mindspore.dataset.rst.txt" rel="nofollow"> View page source</a>
          
        
      </li>
    
  </ul>

  
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
  <div class="section" id="mindspore-dataset">
<h1>mindspore.dataset<a class="headerlink" href="#mindspore-dataset" title="Permalink to this headline">¶</a></h1>
<p>该模块提供了加载和处理各种通用数据集的API，如MNIST、CIFAR-10、CIFAR-100、VOC、COCO、ImageNet、CelebA、CLUE等，
也支持加载业界标准格式的数据集，包括MindRecord、TFRecord、Manifest等。此外，用户还可以使用此模块定义和加载自己的数据集。</p>
<p>该模块还提供了在加载时进行数据采样的API，如SequentialSample、RandomSampler、DistributedSampler等。</p>
<p>大多数数据集可以通过指定参数 <cite>cache</cite> 启用缓存服务，以提升整体数据处理效率。
请注意Windows平台上还不支持缓存服务，因此在Windows上加载和处理数据时，请勿使用。更多介绍和限制，
请参考 <a class="reference external" href="https://www.mindspore.cn/docs/programming_guide/zh-CN/master/cache.html">Single-Node Tensor Cache</a>。</p>
<p>在API示例中，常用的模块导入方法如下：</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">mindspore.dataset</span> <span class="k">as</span> <span class="nn">ds</span>
<span class="kn">from</span> <span class="nn">mindspore.dataset.transforms</span> <span class="kn">import</span> <span class="n">c_transforms</span>
</pre></div>
</div>
<p>常用数据集术语说明如下：</p>
<ul class="simple">
<li><p>Dataset，所有数据集的基类，提供了数据处理方法来帮助预处理数据。</p></li>
<li><p>SourceDataset，一个抽象类，表示数据集管道的来源，从文件和数据库等数据源生成数据。</p></li>
<li><p>MappableDataset，一个抽象类，表示支持随机访问的源数据集。</p></li>
<li><p>Iterator，用于枚举元素的数据集迭代器的基类。</p></li>
</ul>
<div class="section" id="id1">
<h2>视觉<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h2>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"></tr>
<tr class="row-even"><td><p><a class="reference internal" href="dataset/mindspore.dataset.Caltech101Dataset.html#mindspore.dataset.Caltech101Dataset" title="mindspore.dataset.Caltech101Dataset"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.Caltech101Dataset</span></code></a></p></td>
<td><p>读取和解析Caltech101数据集的源文件构建数据集。</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="dataset/mindspore.dataset.Caltech256Dataset.html#mindspore.dataset.Caltech256Dataset" title="mindspore.dataset.Caltech256Dataset"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.Caltech256Dataset</span></code></a></p></td>
<td><p>读取和解析Caltech256数据集的源文件构建数据集。</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="dataset/mindspore.dataset.CelebADataset.html#mindspore.dataset.CelebADataset" title="mindspore.dataset.CelebADataset"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.CelebADataset</span></code></a></p></td>
<td><p>读取和解析CelebA数据集的源文件构建数据集。</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="dataset/mindspore.dataset.Cifar10Dataset.html#mindspore.dataset.Cifar10Dataset" title="mindspore.dataset.Cifar10Dataset"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.Cifar10Dataset</span></code></a></p></td>
<td><p>读取和解析CIFAR-10数据集的源文件构建数据集。</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="dataset/mindspore.dataset.Cifar100Dataset.html#mindspore.dataset.Cifar100Dataset" title="mindspore.dataset.Cifar100Dataset"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.Cifar100Dataset</span></code></a></p></td>
<td><p>读取和解析CIFAR-100数据集的源文件构建数据集。</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="dataset/mindspore.dataset.CityscapesDataset.html#mindspore.dataset.CityscapesDataset" title="mindspore.dataset.CityscapesDataset"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.CityscapesDataset</span></code></a></p></td>
<td><p>读取和解析Cityscapes数据集的源文件构建数据集。</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="dataset/mindspore.dataset.CocoDataset.html#mindspore.dataset.CocoDataset" title="mindspore.dataset.CocoDataset"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.CocoDataset</span></code></a></p></td>
<td><p>读取和解析COCO数据集的源文件构建数据集。</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="dataset/mindspore.dataset.DIV2KDataset.html#mindspore.dataset.DIV2KDataset" title="mindspore.dataset.DIV2KDataset"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.DIV2KDataset</span></code></a></p></td>
<td><p>读取和解析DIV2K数据集的源文件构建数据集。</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="dataset/mindspore.dataset.EMnistDataset.html#mindspore.dataset.EMnistDataset" title="mindspore.dataset.EMnistDataset"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.EMnistDataset</span></code></a></p></td>
<td><p>A source dataset that reads and parses the EMNIST dataset.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="dataset/mindspore.dataset.FakeImageDataset.html#mindspore.dataset.FakeImageDataset" title="mindspore.dataset.FakeImageDataset"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.FakeImageDataset</span></code></a></p></td>
<td><p>A source dataset for generating fake images.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="dataset/mindspore.dataset.FashionMnistDataset.html#mindspore.dataset.FashionMnistDataset" title="mindspore.dataset.FashionMnistDataset"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.FashionMnistDataset</span></code></a></p></td>
<td><p>A source dataset that reads and parses the FASHION-MNIST dataset.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="dataset/mindspore.dataset.FlickrDataset.html#mindspore.dataset.FlickrDataset" title="mindspore.dataset.FlickrDataset"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.FlickrDataset</span></code></a></p></td>
<td><p>A source dataset that reads and parses Flickr8k and Flickr30k dataset.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="dataset/mindspore.dataset.Flowers102Dataset.html#mindspore.dataset.Flowers102Dataset" title="mindspore.dataset.Flowers102Dataset"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.Flowers102Dataset</span></code></a></p></td>
<td><p>A source dataset that reads and parses Flowers102 dataset.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="dataset/mindspore.dataset.ImageFolderDataset.html#mindspore.dataset.ImageFolderDataset" title="mindspore.dataset.ImageFolderDataset"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.ImageFolderDataset</span></code></a></p></td>
<td><p>从树状结构的文件目录中读取图片构建源数据集，同一个文件夹中的所有图片将被分配相同的label。</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="dataset/mindspore.dataset.KMnistDataset.html#mindspore.dataset.KMnistDataset" title="mindspore.dataset.KMnistDataset"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.KMnistDataset</span></code></a></p></td>
<td><p>A source dataset that reads and parses the KMNIST dataset.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="dataset/mindspore.dataset.ManifestDataset.html#mindspore.dataset.ManifestDataset" title="mindspore.dataset.ManifestDataset"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.ManifestDataset</span></code></a></p></td>
<td><p>读取和解析Manifest数据文件构建数据集。</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="dataset/mindspore.dataset.MnistDataset.html#mindspore.dataset.MnistDataset" title="mindspore.dataset.MnistDataset"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.MnistDataset</span></code></a></p></td>
<td><p>读取和解析MNIST数据集的源文件构建数据集。</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="dataset/mindspore.dataset.PhotoTourDataset.html#mindspore.dataset.PhotoTourDataset" title="mindspore.dataset.PhotoTourDataset"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.PhotoTourDataset</span></code></a></p></td>
<td><p>A source dataset that reads and parses the PhotoTour dataset.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="dataset/mindspore.dataset.Places365Dataset.html#mindspore.dataset.Places365Dataset" title="mindspore.dataset.Places365Dataset"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.Places365Dataset</span></code></a></p></td>
<td><p>A source dataset that reads and parses the Places365 dataset.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="dataset/mindspore.dataset.QMnistDataset.html#mindspore.dataset.QMnistDataset" title="mindspore.dataset.QMnistDataset"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.QMnistDataset</span></code></a></p></td>
<td><p>A source dataset that reads and parses the QMNIST dataset.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="dataset/mindspore.dataset.SBDataset.html#mindspore.dataset.SBDataset" title="mindspore.dataset.SBDataset"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.SBDataset</span></code></a></p></td>
<td><p>A source dataset that reads and parses Semantic Boundaries Dataset.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="dataset/mindspore.dataset.SBUDataset.html#mindspore.dataset.SBUDataset" title="mindspore.dataset.SBUDataset"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.SBUDataset</span></code></a></p></td>
<td><p>A source dataset that reads and parses the SBU dataset.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="dataset/mindspore.dataset.SemeionDataset.html#mindspore.dataset.SemeionDataset" title="mindspore.dataset.SemeionDataset"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.SemeionDataset</span></code></a></p></td>
<td><p>A source dataset that reads and parses Semeion dataset.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="dataset/mindspore.dataset.STL10Dataset.html#mindspore.dataset.STL10Dataset" title="mindspore.dataset.STL10Dataset"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.STL10Dataset</span></code></a></p></td>
<td><p>A source dataset that reads and parses STL10 dataset.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="dataset/mindspore.dataset.SVHNDataset.html#mindspore.dataset.SVHNDataset" title="mindspore.dataset.SVHNDataset"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.SVHNDataset</span></code></a></p></td>
<td><p>A source dataset that reads and parses SVHN dataset.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="dataset/mindspore.dataset.USPSDataset.html#mindspore.dataset.USPSDataset" title="mindspore.dataset.USPSDataset"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.USPSDataset</span></code></a></p></td>
<td><p>A source dataset that reads and parses the USPS dataset.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="dataset/mindspore.dataset.VOCDataset.html#mindspore.dataset.VOCDataset" title="mindspore.dataset.VOCDataset"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.VOCDataset</span></code></a></p></td>
<td><p>读取和解析VOC数据集的源文件构建数据集。</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="dataset/mindspore.dataset.WIDERFaceDataset.html#mindspore.dataset.WIDERFaceDataset" title="mindspore.dataset.WIDERFaceDataset"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.WIDERFaceDataset</span></code></a></p></td>
<td><p>A source dataset that reads and parses WIDERFace dataset.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id2">
<h2>文本<a class="headerlink" href="#id2" title="Permalink to this headline">¶</a></h2>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"></tr>
<tr class="row-even"><td><p><a class="reference internal" href="dataset/mindspore.dataset.AGNewsDataset.html#mindspore.dataset.AGNewsDataset" title="mindspore.dataset.AGNewsDataset"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.AGNewsDataset</span></code></a></p></td>
<td><p>A source dataset that reads and parses AG News datasets.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="dataset/mindspore.dataset.AmazonReviewDataset.html#mindspore.dataset.AmazonReviewDataset" title="mindspore.dataset.AmazonReviewDataset"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.AmazonReviewDataset</span></code></a></p></td>
<td><p>A source dataset that reads and parses Amazon Review Polarity and Amazon Review Full datasets.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="dataset/mindspore.dataset.CLUEDataset.html#mindspore.dataset.CLUEDataset" title="mindspore.dataset.CLUEDataset"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.CLUEDataset</span></code></a></p></td>
<td><p>读取和解析CLUE数据集的源文件构建数据集。</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="dataset/mindspore.dataset.CoNLL2000Dataset.html#mindspore.dataset.CoNLL2000Dataset" title="mindspore.dataset.CoNLL2000Dataset"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.CoNLL2000Dataset</span></code></a></p></td>
<td><p>A source dataset that reads and parses CoNLL2000 dataset.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="dataset/mindspore.dataset.CSVDataset.html#mindspore.dataset.CSVDataset" title="mindspore.dataset.CSVDataset"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.CSVDataset</span></code></a></p></td>
<td><p>读取和解析CSV数据文件构建数据集。</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="dataset/mindspore.dataset.DBpediaDataset.html#mindspore.dataset.DBpediaDataset" title="mindspore.dataset.DBpediaDataset"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.DBpediaDataset</span></code></a></p></td>
<td><p>A source dataset that reads and parses the DBpedia dataset.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="dataset/mindspore.dataset.EnWik9Dataset.html#mindspore.dataset.EnWik9Dataset" title="mindspore.dataset.EnWik9Dataset"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.EnWik9Dataset</span></code></a></p></td>
<td><p>A source dataset that reads and parses EnWik9 dataset.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="dataset/mindspore.dataset.IMDBDataset.html#mindspore.dataset.IMDBDataset" title="mindspore.dataset.IMDBDataset"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.IMDBDataset</span></code></a></p></td>
<td><p>A source dataset that reads and parses Internet Movie Database (IMDb).</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="dataset/mindspore.dataset.IWSLT2016Dataset.html#mindspore.dataset.IWSLT2016Dataset" title="mindspore.dataset.IWSLT2016Dataset"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.IWSLT2016Dataset</span></code></a></p></td>
<td><p>A source dataset that reads and parses IWSLT2016 datasets.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="dataset/mindspore.dataset.IWSLT2017Dataset.html#mindspore.dataset.IWSLT2017Dataset" title="mindspore.dataset.IWSLT2017Dataset"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.IWSLT2017Dataset</span></code></a></p></td>
<td><p>A source dataset that reads and parses IWSLT2017 datasets.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="dataset/mindspore.dataset.PennTreebankDataset.html#mindspore.dataset.PennTreebankDataset" title="mindspore.dataset.PennTreebankDataset"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.PennTreebankDataset</span></code></a></p></td>
<td><p>A source dataset that reads and parses PennTreebank datasets.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="dataset/mindspore.dataset.SogouNewsDataset.html#mindspore.dataset.SogouNewsDataset" title="mindspore.dataset.SogouNewsDataset"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.SogouNewsDataset</span></code></a></p></td>
<td><p>A source dataset that reads and parses Sogou News dataset.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="dataset/mindspore.dataset.TextFileDataset.html#mindspore.dataset.TextFileDataset" title="mindspore.dataset.TextFileDataset"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.TextFileDataset</span></code></a></p></td>
<td><p>读取和解析文本文件构建数据集。</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="dataset/mindspore.dataset.UDPOSDataset.html#mindspore.dataset.UDPOSDataset" title="mindspore.dataset.UDPOSDataset"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.UDPOSDataset</span></code></a></p></td>
<td><p>A source dataset that reads and parses UDPOS dataset.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="dataset/mindspore.dataset.WikiTextDataset.html#mindspore.dataset.WikiTextDataset" title="mindspore.dataset.WikiTextDataset"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.WikiTextDataset</span></code></a></p></td>
<td><p>A source dataset that reads and parses WikiText2 and WikiText103 datasets.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="dataset/mindspore.dataset.YahooAnswersDataset.html#mindspore.dataset.YahooAnswersDataset" title="mindspore.dataset.YahooAnswersDataset"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.YahooAnswersDataset</span></code></a></p></td>
<td><p>A source dataset that reads and parses the YahooAnswers dataset.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="dataset/mindspore.dataset.YelpReviewDataset.html#mindspore.dataset.YelpReviewDataset" title="mindspore.dataset.YelpReviewDataset"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.YelpReviewDataset</span></code></a></p></td>
<td><p>A source dataset that reads and parses Yelp Review Polarity and Yelp Review Full dataset.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id3">
<h2>音频<a class="headerlink" href="#id3" title="Permalink to this headline">¶</a></h2>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"></tr>
<tr class="row-even"><td><p><a class="reference internal" href="dataset/mindspore.dataset.LJSpeechDataset.html#mindspore.dataset.LJSpeechDataset" title="mindspore.dataset.LJSpeechDataset"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.LJSpeechDataset</span></code></a></p></td>
<td><p>A source dataset that reads and parses LJSpeech dataset.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="dataset/mindspore.dataset.SpeechCommandsDataset.html#mindspore.dataset.SpeechCommandsDataset" title="mindspore.dataset.SpeechCommandsDataset"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.SpeechCommandsDataset</span></code></a></p></td>
<td><p>A source dataset that reads and parses the SpeechCommands dataset.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="dataset/mindspore.dataset.TedliumDataset.html#mindspore.dataset.TedliumDataset" title="mindspore.dataset.TedliumDataset"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.TedliumDataset</span></code></a></p></td>
<td><p>A source dataset that reads and parses Tedlium dataset.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="dataset/mindspore.dataset.YesNoDataset.html#mindspore.dataset.YesNoDataset" title="mindspore.dataset.YesNoDataset"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.YesNoDataset</span></code></a></p></td>
<td><p>A source dataset that reads and parses the YesNo dataset.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id4">
<h2>标准格式<a class="headerlink" href="#id4" title="Permalink to this headline">¶</a></h2>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"></tr>
<tr class="row-even"><td><p><a class="reference internal" href="dataset/mindspore.dataset.CSVDataset.html#mindspore.dataset.CSVDataset" title="mindspore.dataset.CSVDataset"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.CSVDataset</span></code></a></p></td>
<td><p>读取和解析CSV数据文件构建数据集。</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="dataset/mindspore.dataset.MindDataset.html#mindspore.dataset.MindDataset" title="mindspore.dataset.MindDataset"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.MindDataset</span></code></a></p></td>
<td><p>读取和解析MindRecord数据文件构建数据集。</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="dataset/mindspore.dataset.TFRecordDataset.html#mindspore.dataset.TFRecordDataset" title="mindspore.dataset.TFRecordDataset"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.TFRecordDataset</span></code></a></p></td>
<td><p>读取和解析TFData格式的数据文件构建数据集。</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id5">
<h2>用户自定义<a class="headerlink" href="#id5" title="Permalink to this headline">¶</a></h2>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"></tr>
<tr class="row-even"><td><p><a class="reference internal" href="dataset/mindspore.dataset.GeneratorDataset.html#mindspore.dataset.GeneratorDataset" title="mindspore.dataset.GeneratorDataset"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.GeneratorDataset</span></code></a></p></td>
<td><p>自定义Python数据源，通过迭代该数据源构造数据集。</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="dataset/mindspore.dataset.NumpySlicesDataset.html#mindspore.dataset.NumpySlicesDataset" title="mindspore.dataset.NumpySlicesDataset"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.NumpySlicesDataset</span></code></a></p></td>
<td><p>由Python数据构建数据集。</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="dataset/mindspore.dataset.PaddedDataset.html#mindspore.dataset.PaddedDataset" title="mindspore.dataset.PaddedDataset"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.PaddedDataset</span></code></a></p></td>
<td><p>由用户提供的填充数据构建数据集。</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="dataset/mindspore.dataset.RandomDataset.html#mindspore.dataset.RandomDataset" title="mindspore.dataset.RandomDataset"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.RandomDataset</span></code></a></p></td>
<td><p>A source dataset that generates random data.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id6">
<h2>图<a class="headerlink" href="#id6" title="Permalink to this headline">¶</a></h2>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"></tr>
<tr class="row-even"><td><p><a class="reference internal" href="dataset/mindspore.dataset.GraphData.html#mindspore.dataset.GraphData" title="mindspore.dataset.GraphData"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.GraphData</span></code></a></p></td>
<td><p>从共享文件或数据库中读取用于GNN训练的图数据集。</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id7">
<h2>采样器<a class="headerlink" href="#id7" title="Permalink to this headline">¶</a></h2>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"></tr>
<tr class="row-even"><td><p><a class="reference internal" href="dataset/mindspore.dataset.DistributedSampler.html#mindspore.dataset.DistributedSampler" title="mindspore.dataset.DistributedSampler"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.DistributedSampler</span></code></a></p></td>
<td><p>分布式采样器，将数据集进行分片用于分布式训练。</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="dataset/mindspore.dataset.PKSampler.html#mindspore.dataset.PKSampler" title="mindspore.dataset.PKSampler"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.PKSampler</span></code></a></p></td>
<td><p>为数据集中每P个类别各采样K个样本。</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="dataset/mindspore.dataset.RandomSampler.html#mindspore.dataset.RandomSampler" title="mindspore.dataset.RandomSampler"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.RandomSampler</span></code></a></p></td>
<td><p>随机采样器。</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="dataset/mindspore.dataset.SequentialSampler.html#mindspore.dataset.SequentialSampler" title="mindspore.dataset.SequentialSampler"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.SequentialSampler</span></code></a></p></td>
<td><p>按数据集的读取顺序采样数据集样本，相当于不使用采样器。</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="dataset/mindspore.dataset.SubsetRandomSampler.html#mindspore.dataset.SubsetRandomSampler" title="mindspore.dataset.SubsetRandomSampler"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.SubsetRandomSampler</span></code></a></p></td>
<td><p>给定样本的索引序列，从序列中随机获取索引对数据集进行采样。</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="dataset/mindspore.dataset.SubsetSampler.html#mindspore.dataset.SubsetSampler" title="mindspore.dataset.SubsetSampler"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.SubsetSampler</span></code></a></p></td>
<td><p>给定样本的索引序列，对数据集采样指定索引的样本。</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="dataset/mindspore.dataset.WeightedRandomSampler.html#mindspore.dataset.WeightedRandomSampler" title="mindspore.dataset.WeightedRandomSampler"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.WeightedRandomSampler</span></code></a></p></td>
<td><p>给定样本的权重列表，根据权重决定样本的采样概率，随机采样[0，len(weights) - 1]中的样本。</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id8">
<h2>其他<a class="headerlink" href="#id8" title="Permalink to this headline">¶</a></h2>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"></tr>
<tr class="row-even"><td><p><a class="reference internal" href="dataset/mindspore.dataset.BatchInfo.html#mindspore.dataset.BatchInfo" title="mindspore.dataset.BatchInfo"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.BatchInfo</span></code></a></p></td>
<td><p>此类提供了两种方法获取数据集的批处理数量（batch size）和迭代数（epoch），。</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="dataset/mindspore.dataset.DatasetCache.html#mindspore.dataset.DatasetCache" title="mindspore.dataset.DatasetCache"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.DatasetCache</span></code></a></p></td>
<td><p>创建数据缓存客户端实例。</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="dataset/mindspore.dataset.DSCallback.html#mindspore.dataset.DSCallback" title="mindspore.dataset.DSCallback"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.DSCallback</span></code></a></p></td>
<td><p>数据处理回调类的抽象基类，用户可以基于此类实现自己的回调操作。</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="dataset/mindspore.dataset.SamplingStrategy.html#mindspore.dataset.SamplingStrategy" title="mindspore.dataset.SamplingStrategy"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.SamplingStrategy</span></code></a></p></td>
<td><p>指定图数据采样策略的枚举类。</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="dataset/mindspore.dataset.Schema.html#mindspore.dataset.Schema" title="mindspore.dataset.Schema"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.Schema</span></code></a></p></td>
<td><p>用于解析和存储数据列属性的类。</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="dataset/mindspore.dataset.Shuffle.html#mindspore.dataset.Shuffle" title="mindspore.dataset.Shuffle"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.Shuffle</span></code></a></p></td>
<td><p>指定混洗模式的枚举类。</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="dataset/mindspore.dataset.WaitedDSCallback.html#mindspore.dataset.WaitedDSCallback" title="mindspore.dataset.WaitedDSCallback"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.WaitedDSCallback</span></code></a></p></td>
<td><p>阻塞式数据处理回调类的抽象基类，用于与训练回调类 <a class="reference external" href="https://mindspore.cn/docs/api/zh-CN/master/api_python/mindspore.train.html#mindspore.train.callback.Callback">mindspore.train.callback</a> 的同步。</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="dataset/mindspore.dataset.OutputFormat.html#mindspore.dataset.OutputFormat" title="mindspore.dataset.OutputFormat"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.OutputFormat</span></code></a></p></td>
<td><p>通过API <cite>get_all_neighbors</cite> 获取所有相邻节点时，指定节点的存储格式。</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="dataset/mindspore.dataset.compare.html#mindspore.dataset.compare" title="mindspore.dataset.compare"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.compare</span></code></a></p></td>
<td><p>比较两个数据处理管道是否相同。</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="dataset/mindspore.dataset.deserialize.html#mindspore.dataset.deserialize" title="mindspore.dataset.deserialize"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.deserialize</span></code></a></p></td>
<td><p>数据处理管道反序列化，支持输入Python字典或使用 <cite>mindspore.dataset.serialize()</cite> 接口生成的JSON文件。</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="dataset/mindspore.dataset.serialize.html#mindspore.dataset.serialize" title="mindspore.dataset.serialize"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.serialize</span></code></a></p></td>
<td><p>将数据处理管道序列化成JSON文件。</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="dataset/mindspore.dataset.show.html#mindspore.dataset.show" title="mindspore.dataset.show"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.show</span></code></a></p></td>
<td><p>将数据处理管道图写入MindSpore的INFO级别日志文件。</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="dataset/mindspore.dataset.utils.imshow_det_bbox.html#mindspore.dataset.utils.imshow_det_bbox" title="mindspore.dataset.utils.imshow_det_bbox"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.utils.imshow_det_bbox</span></code></a></p></td>
<td><p>使用给定的边界框和类别置信度绘制图像。</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="dataset/mindspore.dataset.zip.html#mindspore.dataset.zip" title="mindspore.dataset.zip"><code class="xref py py-obj docutils literal notranslate"><span class="pre">mindspore.dataset.zip</span></code></a></p></td>
<td><p>将多个dataset对象按列进行合并压缩。</p></td>
</tr>
</tbody>
</table>
</div>
</div>


           </div>
           
          </div>
          <footer>
    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
        <a href="dataset/mindspore.dataset.Caltech101Dataset.html" class="btn btn-neutral float-right" title="mindspore.dataset.Caltech101Dataset" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
        <a href="mindspore.context.html" class="btn btn-neutral float-left" title="mindspore.context" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
    </div>

  <hr/>

  <div role="contentinfo">
    <p>
        &#169; Copyright 2021, MindSpore.

    </p>
  </div>
    
    
    
    Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
    
    <a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
    
    provided by <a href="https://readthedocs.org">Read the Docs</a>. 

</footer>
        </div>
      </div>

    </section>

  </div>
  

  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script>

  
  
    
   

</body>
</html>